<div class="slideshow fl-left">
	<script src="catalog/view/theme/default/js/jquery.nivo.slider.pack.js" type="text/javascript"></script>
    <script type="text/javascript">
     (function(jQuery) {       
        jQuery(window).load(function() {
        jQuery('#sliderShow').nivoSlider({
            effect:'fade',
            pauseTime:6000,
            pauseOnHover:true,
            directionNavHide:true
            });
        });       
        })(jQuery);
    </script>
    
    <div id="sliderShow" class="fl-left" style="overflow:hidden; height: 293px;width: 671px; margin: 30px 0 0 22px;">
    	<?php if(isset($banners) && sizeof($banners) > 0) {
        foreach($banners as $rs) {
        ?>
            <a href="<?php echo $rs['link'];?>"><img src="<?php echo $rs['image'];?>" alt="" /></a>
         <?php } } ?>      
    </div> 
    <!-- / slideshow -->
    <?php if(isset($products) && sizeof($products) > 0) { ?>
    <script type="text/javascript">
        jQuery(function(){
            jQuery("#newProducts").jCarouselLite({
                btnNext: ".next",
                btnPrev: ".prev",
                visible : 1,
                circular : true,
                auto:3000,
                scroll: 1,
                speed : 800
            });
    
        });
    </script>
    <?php
    }
    ?>
    <!-- new products -->
    <div id="newPrd" class="fl-left">
        <h1 class="hidden-txt">Hàng mới về</h1>
        <div id="newProducts">
            <div id="prdSlider">	
                <ul>
              		<?php if(isset($products) && sizeof($products) > 0) {
                    foreach($products as $rs) {
                    ?>
                    <li>
                        <div class="thumbnail">
                            <a class="tip" href="<?php echo $rs['href'];?>" title="<?php echo $rs['name'];?>"><img class="captify" src="<?php echo $rs['image'];?>" alt="DHA -ARA tinh khiết USA" /></a>
                        </div>
                        <div class="info">
                            <a href="<?php echo $rs['href'];?>"><?php echo $rs['name'];?></a>
                        </div>
                    </li>
                    <?php } } ?>   
                   
                </ul>
            </div>
        </div>
    </div>
    <!-- /new products -->
    
</div>


<?php return;?>


<div class="slideshow fl-left">
                                <script type="text/javascript" src="catalog/view/theme/default/js/jquery.nivo.slider.pack.js"></script>
                                <script type="text/javascript">
                                 (function($) {       
                                    $(window).load(function() {
                                    $('#sliderShow').nivoSlider({
                                        effect:'fade',
                                        pauseTime:4000,
                                        pauseOnHover:true,
                                        directionNavHide:true
                                        });
                                    });       
                                    })(jQuery);
                                </script>
                                
                                <div id="sliderShow" class="fl-left" style="overflow:hidden; height: 293px;width: 671px; margin: 30px 0 0 22px;">    
								<?php if(isset($banners) && sizeof($banners) > 0) {
								foreach($banners as $rs) {
								?>
                                    <a href="<?php echo $rs['link'];?>"><img src="<?php echo $rs['image'];?>" alt="" /></a>
                                 <?php } } ?>   
                                </div> 
                                <!-- / slideshow -->
                                <script type="text/javascript">
									$(function(){
										$("#newProducts").jCarouselLite({
											btnNext: ".next",
											btnPrev: ".prev",
											visible : 1,
											circular : true,
											auto:3000,
											scroll: 1,
											speed : 800
										});							
									});
								</script>
                                <!-- new products -->
								
																
                                <div class="fl-left" id="newPrd">
                                    <h1 class="hidden-txt">Hàng mới về</h1>
                                    <div id="newProducts" style="visibility: visible; overflow: hidden; position: relative; z-index: 2; left: 0px; width: 166px;">
                                        <a title="Trở lại" href="#" class="btn prev"></a>
                                        <div id="prdSlider">	
                                            <ul style="margin: 0pt; padding: 0pt; position: relative; list-style-type: none; z-index: 1; width: 1162px; left: -664px;">
											
											<?php if(isset($products) && sizeof($products) > 0) {
											foreach($products as $rs) {
											?>
											
											
											<li style="float: left; width: 166px; height: 240px;">											
                                                    <div class="thumbnail">
                                                        <a title="<?php echo $rs['name'];?>" href="<?php echo $rs['href'];?>"><img alt="<?php echo $rs['name'];?>" src="<?php echo $rs['image'];?>" class="captify"></a>
                                                    </div>
                                                    <div class="info">
                                                        <a href="<?php echo $rs['href'];?>"><?php echo $rs['name'];?></a>
                                                    </div>
                                                </li>
												
											<?php } } ?>      
												
												
												</ul>
                                        </div>
                                        <a title="Kế tiếp" href="#" class="btn next"></a>
                                    </div>
                                </div>
                                <!-- /new products -->
                                
                            </div>
<?php return;?>



<div class="box">
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a></div>
      </div>
      <?php } ?>
    </div>
  </div>
</div>
